Syntax and Semantics of Abstract Binding Trees

نویسندگان

  • Jonathan Sterling
  • Darin Morrison
چکیده

binding trees (abts) are a generalization of abstract syntax trees where operators may express variable binding structure as part of their arities. Originally formulated by Peter Aczel [1], unisorted abts have been deployed successfully as the uniform syntactic framework for several implementations of Constructive Type Theory, including Nuprl [3], MetaPRL [13] and JonPRL [21]. In Practical Foundations for Programming Languages [12], Robert Harper develops the multi-sorted version of abstract binding trees and proposes an extension to include families of operators indexed by symbols, which are, unlike variables, subject to only distinctnesspreserving renaming and not substitution; furthermore, symbols do not appear in the syntax of abts, and are only introduced as parameters to operators. This extension to support symbols is essential for a correct treatment of programming languages with open sums (e.g. ML’s exn type), as well as assignable references. In parallel, M. Fiore and his collaborators have developed the categorical semantics for several variations of second-order algebraic theories [8, 10, 6, 7]; of these, the simply sorted variants are equivalent to Harper’s abstract binding trees augmented with a notion of second-order variable (metavariable). The contribution of this paper is the development of the syntax and semantics of multi-sorted nominal abts, an extension of second order universal algebra to support symbol-indexed families of operators. Additionally, we have developed the categorical semantics for abts formally in Constructive Type Theory using the Agda proof assistant [18]; we have also developed an implementation for abstract binding trees in Standard ML, which we intend to integrate into the JonPRL proof assistant [21]. 1 Categorical Preliminaries Fix a set S of sorts; we will say τ sort when τ ∈ S. In this section, we will develop a theory of sets varying over collections of S-sorted symbols. Let I be the category of finite cardinals and their injective maps; then the comma construction I ↓ S, is the category of contexts of symbols whose objects are finite sets of symbols U and sort-assignments U S s , and whose morphisms are sort-preserving renamings; we will write Υ for a symbol context (U, s). 1 ar X iv :1 60 1. 06 29 8v 1 [ cs .L O ] 2 3 Ja n 20 16 Remark 1.1. To be precise, I ↓ S is an abuse of notation for the comma category |−|I ↓ ∆[S], with |−|I the forgetful functor from I to Set, and ∆[S](∗) , S a constant functor from 1 to Set. Formally, an object of I ↓ S is, then, a triple 〈U, ∗, s〉withU an object in I, ∗ the unique object in 1, and s a function |U|I S; an arrow ρ : 〈U, ∗, s〉 〈V , ∗, t〉 is a commuting triangle like the following: |U|I |V |I

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Equivariant Syntax and Semantics

syntax is not sufficiently abstract Parse trees take no account of variable binding. ∫ x 0 (∫ y 1 xy dx )

متن کامل

Initial Algebra Semantics for Cyclic Sharing Tree Structures

Terms are a concise representation of tree structures. Since they can be naturally defined by an inductive type, they offer data structures in functional programming and mechanised reasoning with useful principles such as structural induction and structural recursion. However, for graphs or ”tree-like” structures – trees involving cycles and sharing – it remains unclear what kind of inductive s...

متن کامل

A Fully Abstract Semantics for Concurrent Graph Reduction

This paper presents a fully abstract semantics for a variant of the untyped λ-calculus with recursive declarations. We first present a summary of existing work on full abstraction for the untyped λ-calculus, concentrating on ABRAMSKY and ONG’s work on the lazy λ-calculus. ABRAMSKY and ONG’s work is based on leftmost outermost reduction without sharing. This is notably inefficient, and many impl...

متن کامل

Reverse Engineering of Network Software Binary Codes for Identification of Syntax and Semantics of Protocol Messages

Reverse engineering of network applications especially from the security point of view is of high importance and interest. Many network applications use proprietary protocols which specifications are not publicly available. Reverse engineering of such applications could provide us with vital information to understand their embedded unknown protocols. This could facilitate many tasks including d...

متن کامل

Finite-depth higher-order abstract syntax trees for reasoning about probabilistic programs

We define a core calculus for the purpose of investigating reasoning principles of probabilistic programming languages. By using a variation of a technique called higher-order abstract syntax (HOAS), which is common in the implementation of domain-specific languages, the calculus captures the semantics of a stochastic language with observation while being agnostic to the details of its determin...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • CoRR

دوره abs/1601.06298  شماره 

صفحات  -

تاریخ انتشار 2016